home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / amigae.jan.archive / 000054_crash!cup.portal.com!Vette_Sun, 23 Jan 94 01:06:20 PST.msg < prev    next >
Text File  |  1994-02-17  |  5KB  |  132 lines

  1. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  2.       id <1n22@bkhouse.cts.com>; Sun, 23 Jan 94 01:06:20 PST
  3. Received: from nova.unix.portal.com by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #18) id m0pNxry-0000uNC; Sat, 22 Jan 94 22:00 PST
  5. Received: from hobo.corp.portal.com (hobo.corp.portal.com [156.151.1.14]) by nova.unix.portal.com (8.6.4/8.6.4-1.13) with ESMTP id WAA14194 for <amigae@bkhouse.cts.com>; Sat, 22 Jan 1994 22:01:04 -0800
  6. Received: from localhost (pccop@localhost) by hobo.corp.portal.com (8.6.4/%I%) id WAA22738 for amigae@bkhouse.cts.com; Sat, 22 Jan 1994 22:01:02 -0800
  7. Lines: 13
  8. Date: Sat, 22 Jan 94 22:01:02 PST
  9. Message-ID: <9401222201.1.21174@cup.portal.com>
  10. X-Origin: The Portal System (TM)
  11. From: Vette@cup.portal.com
  12. To: AmigaE@bkhouse.cts.com
  13. Subject: Re: More GUI problems
  14.  
  15. Hi all,
  16.    I too would like to know how too build a list for use with the Listview
  17. gadget.  What I need to do is scan a directory or directories and then put
  18. that list in a Listview gadget, then possibly change and update that list.
  19.    I'm pretty much stumped on this one.
  20.  
  21. Any help would be appreciated.
  22.  
  23. Thanx,
  24.  
  25.  
  26. Kevin Schumacher (Vette)
  27. vette@cup.portal.com
  28. From crash!hermes.cam.ac.uk!dmh1002 Sun, 23 Jan 94 05:41:32 PST
  29. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  30.       id <1n3x@bkhouse.cts.com>; Sun, 23 Jan 94 05:41:32 PST
  31. Received: from ppsw2.cam.ac.uk by crash.cts.com with smtp
  32.     (Smail3.1.28.1 #18) id m0pO4OJ-00007WC; Sun, 23 Jan 94 04:58 PST
  33. Received: from black.csi.cam.ac.uk by ppsw2.cam.ac.uk 
  34.           with SMTP-CAM (PP-6.0) as ppsw.cam.ac.uk 
  35.           id <06519-0@ppsw2.cam.ac.uk>; Sun, 23 Jan 1994 12:57:59 +0000
  36. Received: from hermes.cam.ac.uk by black.csi.cam.ac.uk 
  37.           id <28573-0@black.csi.cam.ac.uk>; Sun, 23 Jan 1994 12:57:36 +0000
  38. Date: Sun, 23 Jan 1994 12:58:45 +0000 (GMT)
  39. In-Reply-To: <9401221740.AA00j4u@edtng.Kenosha.WI.US>
  40. Message-ID: <Pine.3.89.9401231249.A14119-0100000@blue.csi.cam.ac.uk>
  41. MIME-Version: 1.0
  42. Content-Type: TEXT/PLAIN; charset=US-ASCII
  43. Sender: dmh1002@hermes.cam.ac.uk
  44. From: Dave Higginson <dmh1002@hermes.cam.ac.uk>
  45. To: The AmigaE Mailing List <AmigaE@bkhouse.cts.com>
  46. Subject: Re: More GUI problems
  47.  
  48.  
  49.  
  50. > OK, I've tried this in my code....
  51. >       SELECT gadgetid
  52. >       CASE ADDLIST
  53. >         AddTail(lvlist,[0,0,0,0,'!x!']:ln)
  54. >         Gt_SetGadgetAttrsA(clicked,win,NIL,[GTLV_LABELS,$FFFFFFFF])
  55. >         Gt_SetGadgetAttrsA(clicked,win,NIL,[GTLV_LABELS,lvlist])
  56. >       ENDSELECT
  57.  
  58. No, you have two lines the wrong way round here.
  59.  
  60. You should put the call with the $FFFFFFFF before you mess with the list. 
  61. Then Intuition is forewarned and won't try to refresh the listview until 
  62. you call with the correct list address.
  63.  
  64. You can't call this routine twice, since the node you're adding is part 
  65. of E compiled code and it will try to use the same address for two 
  66. different nodes. So that is why it is hanging.
  67.  
  68. For multiple nodes, you have to allocate some new memory using New or 
  69. AllocMem or AllocVec. Just make sure that you free it before you quit. 
  70. Try this:
  71.  
  72. DEF node:PTR TO ln,name:STRING
  73. .
  74. .
  75. /* Call this as many times as you like */
  76. Gt_SetGadgetAttrsA(win,gad,NIL,[GTLV_LABELS,$FFFFFFFF,0])
  77. node:=AllocMem(SIZEOF ln,MEMF_CLEAR)
  78. node.name:='!x!'
  79. AddTail(lvlist,node)
  80. Gt_SetGadgetAttrsA(win,gad,NIL,[GTLV_LABELS,lvlist,0])
  81. .
  82. .
  83. .
  84. /* Call this to clean up */
  85. WHILE node:=RemHead(lvlist)
  86.   FreeMem(node,SIZEOF ln)
  87. ENDWHILE
  88.  
  89. OK? Remember though that all your entries will have the same name so you 
  90. will also have to allocate memory for the names, maybe using :
  91.  
  92. StrCopy(s,'Hello',ALL)
  93. node:=AllocVec(StrLen(s),MEMF_CLEAR)
  94. CopyMem(s,node,StrLen(s)
  95.  
  96. Remember though that this memory also needs to be freed in the cleanup 
  97. routine.
  98.  
  99. Hope that gave you a few pointers (bad pun :)
  100.  
  101. Cheers
  102. Dave Higginson
  103. From crash!hermes.cam.ac.uk!dmh1002 Mon, 24 Jan 94 00:48:18 PST
  104. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  105.       id <1n4l@bkhouse.cts.com>; Mon, 24 Jan 94 00:48:18 PST
  106. Received: from ppsw2.cam.ac.uk by crash.cts.com with smtp
  107.     (Smail3.1.28.1 #18) id m0pO6Jh-0000euC; Sun, 23 Jan 94 07:01 PST
  108. Received: from black.csi.cam.ac.uk by ppsw2.cam.ac.uk 
  109.           with SMTP-CAM (PP-6.0) as ppsw.cam.ac.uk 
  110.           id <08988-5@ppsw2.cam.ac.uk>; Sun, 23 Jan 1994 15:01:10 +0000
  111. Received: from hermes.cam.ac.uk by black.csi.cam.ac.uk 
  112.           id <03838-0@black.csi.cam.ac.uk>; Sun, 23 Jan 1994 15:00:55 +0000
  113. Date: Sun, 23 Jan 1994 15:02:02 +0000 (GMT)
  114. Message-ID: <Pine.3.89.9401231532.A20093-0100000@blue.csi.cam.ac.uk>
  115. MIME-Version: 1.0
  116. Content-Type: TEXT/PLAIN; charset=US-ASCII
  117. Sender: dmh1002@hermes.cam.ac.uk
  118. From: Dave Higginson <dmh1002@hermes.cam.ac.uk>
  119. To: amigae@bkhouse.cts.com
  120. Subject: Gt_SetGadgetAttrsA mixup
  121.  
  122.  
  123.  
  124. I just sent a post which used this call and I accidentally got the 
  125. parameters mixed up. Sorry, it should have been:
  126.  
  127. Gt_SetGadgetAttrsA(gad,win,NIL,[GTLV_LABELS,lvlist,0])
  128.  
  129. +--
  130.   // David Higginson, dmh1002@hermes.cam.ac.uk
  131. \X/  Churchill College, Cambridge, CB3 0DS, UK